﻿using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Text;

namespace DinheiroSobControle.Dominio
{
    public interface IRepositorio : IDisposable
    {
        IQueryable<MovimentacaoFinanceira> MovimentacaoFinanceiraDataSource
        {
            get;
        }

        IQueryable<TEntity> GetQueryable<TEntity>() where TEntity : class;

        ITable GetEditable<TEntity>() where TEntity : class;

        void Insert<TEntity>(TEntity instance) where TEntity : class;

        void InsertAll<TEntity>(IEnumerable<TEntity> instances) where TEntity : class;

        void Delete<TEntity>(TEntity instance) where TEntity : class;

        void DeleteAll<TEntity>(IEnumerable<TEntity> instances) where TEntity : class;

        void SubmitChanges();
    }

}
